home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / INFO / DOSTIPS6.ZIP / DOSPRINT < prev    next >
Text File  |  1987-03-03  |  2KB  |  36 lines

  1.                       ECHO Printer Control
  2.                (PC World March 1987 Star-Dot-Star)
  3.  
  4.      You can use the ECHO command with the redirection symbol to send
  5. escape sequences and control codes to a printer.  This technique works
  6. from within batch files, or you can type the commands directly from
  7. the keyboard.
  8.      Most printer control sequences begin with the escape character;
  9. however, pressing <Esc> while issuing a DOS command cancels that
  10. command.  The trick is to use the ASCII 155 character, which many
  11. printers interpret as a normal escape character.  To generate the
  12. character, hold down the <Alt> key while entering 155 on the numeric
  13. keypad.
  14.      Enter the remainder of the printer control sequence immediately
  15. after the escape character, without any intervening spaces.  You can
  16. type any character, or you can hold down the <Alt> key and enter a
  17. decimal ASCII character value directly on the numeric keypad.
  18.      For example, to send the sequence Escape E to trigger emphasized
  19. printing, you would type ECHO followed by a space, hold down the <Alt>
  20. key while typing 155 on the numeric keypad, release <Alt>, and then
  21. type E, a space, and > PRN.  This last part of the command redirects
  22. output of the ECHO command to the printer instead of the screen.
  23.      The printer must be in a "character set" mode so it will recognize
  24. the escape sequence as a printer control code.  Otherwise the characters
  25. will print instead of controlling the printer.  On an IBM Proprinter,
  26. for instance, you must send all of the control codes before selecting
  27. character set 2 (character set 1 is the default).
  28.      Note, too, that a single ECHO command can send more than one
  29. escape sequence.  For example, if you want to select 12-pitch, double-
  30. strike, underlined printing, the escape sequence for an IBM Proprinter
  31. would be <Esc>:<Esc>G<Esc>-1.
  32.      You may want to include frequently used printer control sequences
  33. in your system's AUTOEXEC.BAT file to configure the printer
  34. automatically whenever you turn on the computer.
  35.  
  36.